ns16550: mask transmit holding register empty interrupt when tx is stopped
The uart generates an interrupt whenever the transmit holding register is
empty and UART_IER_ETHREI is set in UART_IER. Currently, Xen's ns16550
driver does not currently mask this interrupt when transmit is stopped,
unlike other platforms such as Linux [1].
Toggle UART_IER_ETHREI flag in the UART_IER according to the state dictated
by stop_tx and start_tx hooks.
On the Tegra platform (forthcoming series), the reset via reading IIR does not
prevent re-assertion of THRE. This causes Xen to hang in the interrupt
handler's while loop whenever there is no data to transmit. This behavior (bug?)
is addressed by utilizing the start & stop tx hooks.
This has been tested on various x86 PCs for any obvious signs of regressions.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/8250_port.c?id=refs/tags/v4.8-rc2#n1518
Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
Acked-by: Jan Beulich <jbeulich@suse.com>